/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controllers;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import javax.persistence.*;
import Entities.*;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.SpinnerModel;
import sun.misc.IOUtils;

/**
 *
 * @author Heinz Hernandez
 */
public class LoadData {

    public void loadVetsInDB() {
        EntityManagerFactory emFactory = Persistence.createEntityManagerFactory("HPVAS_HPU");
        EntityManager em = emFactory.createEntityManager();

        PersonJpaController perCtrl = new PersonJpaController(emFactory);

        //if (perCtrl.findPersonEntities().isEmpty()) {
        Person p1 = new Person();
        Person p2 = new Person();
        Person p3 = new Person();
        Person p4 = new Person();
        Person p5 = new Person();
        Person p6 = new Person();
        Person p7 = new Person();
        Person p8 = new Person();
        Person p9 = new Person();
        Person p10 = new Person();

        Date p1date;
        p1date = new Date(1970, 4, 15);
        p1.setPerName("ANTONIO");
        p1.setPerLastName("GONZALES");
        p1.setPerSsn("123456789");
        p1.setPerBirthDate(p1date);
        p1.setPerBirthPlace("BOGOTA DC");
        p1.setPerFocus("PARASITOLOGY");
        p1.setPerSpeciality("INTESTINAL PATHOLOGY");
        p1.setPerSalary(1800000);
        p1.setPerGraduateat("BOGOTA DC");
        p1.setPerType("veterinary");


        Date p2date;
        p2date = new Date(1980, 5, 15);
        p2.setPerName("CAROLINA");
        p2.setPerLastName("HERNANDEZ");
        p2.setPerSsn("909878765");
        p2.setPerBirthDate(p2date);
        p2.setPerBirthPlace("BOGOTA DC");
        p2.setPerFocus("BACTERIOLOGY");
        p2.setPerSpeciality("INFECTIOUS DISEASES");
        p2.setPerSalary(1700000);
        p2.setPerGraduateat("BOGOTA DC");
        p2.setPerType("veterinary");

        Date p3date;
        p3date = new Date(1975, 10, 15);
        p3.setPerName("JULIO");
        p3.setPerLastName("GOMEZ");
        p3.setPerSsn("999999999");
        p3.setPerBirthDate(p3date);
        p3.setPerBirthPlace("MEDELLIN");
        p3.setPerFocus("BACTERIOLOGY");
        p3.setPerSpeciality("VIRAL DISEASES");
        p3.setPerSalary(1400000);
        p3.setPerGraduateat("BOGOTA DC");
        p3.setPerType("veterinary");

        Date p4date;
        p4date = new Date(1973, 9, 15);
        p4.setPerName("LUIS");
        p4.setPerLastName("TORRES");
        p4.setPerSsn("3456544565");
        p4.setPerBirthDate(p4date);
        p4.setPerBirthPlace("MEDELLIN");
        p4.setPerFocus("ANESTHESIOLOGY");
        p4.setPerSpeciality("ANIMAL SURGERY");
        p4.setPerSalary(2800000);
        p4.setPerGraduateat("BOGOTA DC");
        p4.setPerType("veterinary");

        Date p5date;
        p5date = new Date(1973, 8, 21);
        p5.setPerName("HAROLD");
        p5.setPerLastName("CRISTANCHO");
        p5.setPerSsn("676767675");
        p5.setPerBirthDate(p5date);
        p5.setPerBirthPlace("CALI");
        p5.setPerFocus("VASCULAR SYSTEM");
        p5.setPerSpeciality("VASCULAR SURGERY");
        p5.setPerSalary(2400000);
        p5.setPerGraduateat("BOGOTA DC");
        p5.setPerType("veterinary");

        perCtrl.create(p1);
        perCtrl.create(p2);
        perCtrl.create(p3);
        perCtrl.create(p4);
        perCtrl.create(p5);




    }

    public void loadOwnersInDB() {
        EntityManagerFactory emFactory = Persistence.createEntityManagerFactory("HPVAS_HPU");
        EntityManager em = emFactory.createEntityManager();

        PersonJpaController perCtrl = new PersonJpaController(emFactory);


        Person p1 = new Person();
        Person p2 = new Person();
        Person p3 = new Person();
        Person p4 = new Person();
        Person p5 = new Person();
        Person p6 = new Person();
        Person p7 = new Person();
        Person p8 = new Person();
        Person p9 = new Person();
        Person p10 = new Person();
        Person p11 = new Person();

        Date p1date;
        p1date = new Date(1965, 3, 25);
        p1.setPerName("JUAN");
        p1.setPerLastName("PALLARES");
        p1.setPerSsn("76767655");
        p1.setPerBirthDate(p1date);
        p1.setPerBirthPlace("IBAGUE");
        p1.setPerFocus("Not available");
        p1.setPerSpeciality("Not available");
        p1.setPerSalary(0);
        p1.setPerGraduateat("Not available");
        p1.setPerType("owner");


        Date p2date;
        p2date = new Date(1983, 5, 15);
        p2.setPerName("TATIANA");
        p2.setPerLastName("HERNANDEZ");
        p2.setPerSsn("909876564");
        p2.setPerBirthDate(p2date);
        p2.setPerBirthPlace("VILLAVICENCIO");
        p2.setPerFocus("Not available");
        p2.setPerSpeciality("Not available");
        p2.setPerSalary(0);
        p2.setPerGraduateat("Not available");
        p2.setPerType("owner");

        Date p3date;
        p3date = new Date(1990, 04, 15);
        p3.setPerName("JULIAN");
        p3.setPerLastName("RODRIGUEZ");
        p3.setPerSsn("212121212");
        p3.setPerBirthDate(p3date);
        p3.setPerBirthPlace("MEDELLIN");
        p3.setPerFocus("Not available");
        p3.setPerSpeciality("Not available");
        p3.setPerSalary(0);
        p3.setPerGraduateat("Not available");
        p3.setPerType("owner");

        Date p4date;
        p4date = new Date(1973, 9, 15);
        p4.setPerName("NICOLAS");
        p4.setPerLastName("TEHERAN");
        p4.setPerSsn("787676565");
        p4.setPerBirthDate(p4date);
        p4.setPerBirthPlace("VILLAVICENCIO");
        p4.setPerFocus("Not Available");
        p4.setPerSpeciality("Not Available");
        p4.setPerSalary(0);
        p4.setPerGraduateat("Not Available");
        p4.setPerType("owner");

        Date p5date;
        p5date = new Date(1973, 8, 21);
        p5.setPerName("JAIME");
        p5.setPerLastName("OSPINA");
        p5.setPerSsn("444555333");
        p5.setPerBirthDate(p5date);
        p5.setPerBirthPlace("BOGOTA");
        p5.setPerFocus("Not Available");
        p5.setPerSpeciality("Not Available");
        p5.setPerSalary(0);
        p5.setPerGraduateat("Not Available");
        p5.setPerType("owner");
        
        Date p6date;
        p6date = new Date(1973, 8, 21);
        p6.setPerName("ESTEBAN");
        p6.setPerLastName("PARRA");
        p6.setPerSsn("455678879");
        p6.setPerBirthDate(p6date);
        p6.setPerBirthPlace("BOGOTA");
        p6.setPerFocus("Not Available");
        p6.setPerSpeciality("Not Available");
        p6.setPerSalary(0);
        p6.setPerGraduateat("Not Available");
        p6.setPerType("employee");
        
        Date p7date;
        p7date = new Date(1973, 8, 21);
        p7.setPerName("EMPLOYEE");
        p7.setPerLastName("EMPLOYEE");
        p7.setPerSsn("345654675");
        p7.setPerBirthDate(p7date);
        p7.setPerBirthPlace("BOGOTA");
        p7.setPerFocus("Not Available");
        p7.setPerSpeciality("Not Available");
        p7.setPerSalary(0);
        p7.setPerGraduateat("Not Available");
        p7.setPerType("employee");
        
        Date p8date;
        p8date = new Date(1973, 8, 21);
        p8.setPerName("FERNANDO");
        p8.setPerLastName("HERNANDEZ");
        p8.setPerSsn("809098890");
        p8.setPerBirthDate(p8date);
        p8.setPerBirthPlace("BOGOTA");
        p8.setPerFocus("Not Available");
        p8.setPerSpeciality("Not Available");
        p8.setPerSalary(0);
        p8.setPerGraduateat("Not Available");
        p8.setPerType("employee");
        
        Date p9date;
        p9date = new Date(1973, 8, 21);
        p9.setPerName("GERMAN");
        p9.setPerLastName("FLOREZ");
        p9.setPerSsn("444777890");
        p9.setPerBirthDate(p9date);
        p9.setPerBirthPlace("BOGOTA");
        p9.setPerFocus("Not Available");
        p9.setPerSpeciality("Not Available");
        p9.setPerSalary(0);
        p9.setPerGraduateat("Not Available");
        p9.setPerType("employee");
        
        Date p10date;
        p10date = new Date(1973, 8, 21);
        p10.setPerName("JEISON");
        p10.setPerLastName("CARDENAS");
        p10.setPerSsn("444987890");
        p10.setPerBirthDate(p10date);
        p10.setPerBirthPlace("BOGOTA");
        p10.setPerFocus("Not Available");
        p10.setPerSpeciality("Not Available");
        p10.setPerSalary(0);
        p10.setPerGraduateat("Not Available");
        p10.setPerType("employee");
        
        Date p11date;
        p11date = new Date(1973, 8, 21);
        p11.setPerName("IVAN");
        p11.setPerLastName("DUQUE");
        p11.setPerSsn("444843890");
        p11.setPerBirthDate(p11date);
        p11.setPerBirthPlace("BOGOTA");
        p11.setPerFocus("Not Available");
        p11.setPerSpeciality("Not Available");
        p11.setPerSalary(0);
        p11.setPerGraduateat("Not Available");
        p11.setPerType("employee");
        
        
        
        perCtrl.create(p1);
        perCtrl.create(p2);
        perCtrl.create(p3);
        perCtrl.create(p4);
        perCtrl.create(p5);
        perCtrl.create(p6);
        perCtrl.create(p7);
        perCtrl.create(p8);
        perCtrl.create(p9);
        perCtrl.create(p10);
        perCtrl.create(p11);
    }

    public  byte[] readFully(InputStream input) throws IOException {
        byte[] buffer = new byte[8192];
        int bytesRead;
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        while ((bytesRead = input.read(buffer)) != -1) {
            output.write(buffer, 0, bytesRead);
        }
        return output.toByteArray();
    }

    public void loadPetsInDB() {
        EntityManagerFactory emFactory = Persistence.createEntityManagerFactory("HPVAS_HPU");
        EntityManager em = emFactory.createEntityManager();

        PetJpaController petCtrl = new PetJpaController(emFactory);
        PersonJpaController perCtrl = new PersonJpaController(emFactory);

        InputStream is1 = LoadData.class.getResourceAsStream("/images/pet_pic.jpg");
        InputStream is2 = LoadData.class.getResourceAsStream("/images/pet2_pic.jpg");
        InputStream is3 = LoadData.class.getResourceAsStream("/images/pet3_pic.jpg");
        InputStream is4 = LoadData.class.getResourceAsStream("/images/cat_pic.jpg");
        InputStream is5 = LoadData.class.getResourceAsStream("/images/pet4_pic.jpg");
        InputStream is6 = LoadData.class.getResourceAsStream("/images/pet5_pic.jpg");
        InputStream is7 = LoadData.class.getResourceAsStream("/images/cat2_pic.jpg");
        
        Person pers1 = new Person(Long.valueOf(1));
        Person pers2 = new Person(Long.valueOf(2));
        Person pers3 = new Person(Long.valueOf(3));
        Person pers4 = new Person(Long.valueOf(4));
        Person pers5 = new Person(Long.valueOf(5));
        Person pers7 = new Person(Long.valueOf(7));
        Person pers8 = new Person(Long.valueOf(8));
        Person pers9 = new Person(Long.valueOf(9));
        Person pers10 = new Person(Long.valueOf(10));


        Pet p1 = new Pet();
        Pet p2 = new Pet();
        Pet p3 = new Pet();
        Pet p4 = new Pet();
        Pet p5 = new Pet();
        Pet p6 = new Pet();
        Pet p7 = new Pet();
        Pet p8 = new Pet();
        Pet p9 = new Pet();
        Pet p10 = new Pet();

        p1.setPerId(pers1);
        p1.setPerIdown(pers7);
        p1.setPetName("Buddy");
        p1.setPetSpecies("Dog");
        p1.setPetAge(24);
        float wgt = 30;
        p1.setPetWeight(wgt);
        try {
            p1.setPetImg(readFully(is1));
        } catch (IOException ex) {
            Logger.getLogger(LoadData.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        p2.setPerId(pers1);
        p2.setPerIdown(pers7);
        p2.setPetName("Amigo");
        p2.setPetSpecies("Dog");
        p2.setPetAge(28);
        float wgt2 = 25;
        p2.setPetWeight(wgt2);
        try {
            p2.setPetImg(readFully(is2));
        } catch (IOException ex) {
            Logger.getLogger(LoadData.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        p3.setPerId(pers2);
        p3.setPerIdown(pers8);
        p3.setPetName("Friskie");
        p3.setPetSpecies("Dog");
        p3.setPetAge(12);
        float wgt3 = 10;
        p3.setPetWeight(wgt3);
        try {
            p3.setPetImg(readFully(is3));
        } catch (IOException ex) {
            Logger.getLogger(LoadData.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        p4.setPerId(pers2);
        p4.setPerIdown(pers8);
        p4.setPetName("SnowBall");
        p4.setPetSpecies("Cat");
        p4.setPetAge(16);
        float wgt4 = 15;
        p4.setPetWeight(wgt4);
        try {
            p4.setPetImg(readFully(is4));
        } catch (IOException ex) {
            Logger.getLogger(LoadData.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        p5.setPerId(pers3);
        p5.setPerIdown(pers9);
        p5.setPetName("Poseidon");
        p5.setPetSpecies("Dog");
        p5.setPetAge(29);
        float wgt5 = 45;
        p5.setPetWeight(wgt5);
        try {
            p5.setPetImg(readFully(is5));
        } catch (IOException ex) {
            Logger.getLogger(LoadData.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        p6.setPerId(pers3);
        p6.setPerIdown(pers10);
        p6.setPetName("Balto");
        p6.setPetSpecies("Dog");
        p6.setPetAge(30);
        float wgt6 = 40;
        p6.setPetWeight(wgt6);
        try {
            p6.setPetImg(readFully(is6));
        } catch (IOException ex) {
            Logger.getLogger(LoadData.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        p7.setPerId(pers3);
        p7.setPerIdown(pers10);
        p7.setPetName("Arnie");
        p7.setPetSpecies("Cat");
        p7.setPetAge(15);
        float wgt7 = 19;
        p7.setPetWeight(wgt7);
        try {
            p7.setPetImg(readFully(is7));
        } catch (IOException ex) {
            Logger.getLogger(LoadData.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        petCtrl.create(p1);
        petCtrl.create(p2);
        petCtrl.create(p3);
        petCtrl.create(p4);
        petCtrl.create(p5);
	petCtrl.create(p6);
	petCtrl.create(p7);
    }
    
    public void loadRecordsInDB(){
        
        EntityManagerFactory emFactory = Persistence.createEntityManagerFactory("HPVAS_HPU");
        EntityManager em = emFactory.createEntityManager();

        PetJpaController petCtrl = new PetJpaController(emFactory);
        RecordJpaController recCtrl = new RecordJpaController(emFactory);
        
        Pet pet1 = new Pet(Long.valueOf(1));
        Pet pet2 = new Pet(Long.valueOf(2));
        Pet pet3 = new Pet(Long.valueOf(3));
        Pet pet4 = new Pet(Long.valueOf(4));
        Pet pet5 = new Pet(Long.valueOf(5));
        Pet pet6 = new Pet(Long.valueOf(6));
        Pet pet7 = new Pet(Long.valueOf(7));
        
        Record r1 = new Record();
        Record r2 = new Record();
        Record r3 = new Record();
        Record r4 = new Record();
        Record r5 = new Record();
        Record r6 = new Record();
        Record r7 = new Record();
        
        r1.setPetId(pet1);
        r2.setPetId(pet2);
        r3.setPetId(pet3);
        r4.setPetId(pet4);
        r5.setPetId(pet5);
        r6.setPetId(pet6);
        r7.setPetId(pet7);
        
        recCtrl.create(r1);
        recCtrl.create(r2);
        recCtrl.create(r3);
        recCtrl.create(r4);
        recCtrl.create(r5);
        recCtrl.create(r6);
        recCtrl.create(r7);
        
    }
    
    public void loadAppointmentsInDB(){
        
        EntityManagerFactory emFactory = Persistence.createEntityManagerFactory("HPVAS_HPU");
        EntityManager em = emFactory.createEntityManager();

        AppointmentJpaController appCtrl = new AppointmentJpaController(emFactory);
        
        Appointment app1 = new Appointment();
        Appointment app2 = new Appointment();
        Appointment app3 = new Appointment();
        Appointment app4 = new Appointment();
        Appointment app5 = new Appointment();
        Appointment app6 = new Appointment();
        Appointment app7 = new Appointment();
        Appointment app8 = new Appointment();
        Appointment app9 = new Appointment();
        Appointment app10 = new Appointment();
        
        
        Date appdate1;
        Date appdate2;
        Date appdate3;
        Date appdate4;
        Date appdate5;
        Date appdate6;
        Date appdate7;
        Date appdate8;
        Date appdate9;
        Date appdate10;
        
        appdate1 = new Date(2013,05,1);
        appdate2 = new Date(2013,05,2);
        appdate3 = new Date(2013,05,3);
        appdate4 = new Date(2013,05,4);
        appdate5 = new Date(2013,05,5);
        appdate6 = new Date(2013,05,6);
        appdate7 = new Date(2013,05,7);
        appdate8 = new Date(2013,05,8);
        appdate9 = new Date(2013,05,9);
        appdate10 = new Date(2013,05,10);
        
    
        
        Person pers1 = new Person(Long.valueOf(1));
        Person pers2 = new Person(Long.valueOf(2));
        Person pers3 = new Person(Long.valueOf(3));
        Person pers4 = new Person(Long.valueOf(4));
        Person pers5 = new Person(Long.valueOf(5));
        
        Record rec1 = new Record(Long.valueOf(1));
        Record rec2 = new Record(Long.valueOf(2));
        Record rec3 = new Record(Long.valueOf(3));
        Record rec4 = new Record(Long.valueOf(4));
        Record rec5 = new Record(Long.valueOf(5));
        Record rec6 = new Record(Long.valueOf(6));
        Record rec7 = new Record(Long.valueOf(7));
        
        app1.setRecId(rec1);
        app1.setPerId(pers1);
        app1.setAppoDate(appdate1);
        app1.setAppoCharge(45000);
        app1.setAppoNotes("APPOINTMENT SUCCESFULL XXXXXXXXXXX");
        
        app2.setRecId(rec1);
        app2.setPerId(pers1);
        app2.setAppoDate(appdate2);
        app2.setAppoCharge(25800);
        app2.setAppoNotes("GIVEN EAR INFECTION MEDICATION");
        
        app3.setRecId(rec1);
        app3.setPerId(pers1);
        app3.setAppoDate(appdate3);
        app3.setAppoCharge(30000);
        app3.setAppoNotes("CONTROL EXAMINATION");
        
        app4.setRecId(rec5);
        app4.setPerId(pers3);
        app4.setAppoDate(appdate4);
        app4.setAppoCharge(120000);
        app4.setAppoNotes("GENERAL EXAMINATION, SHOWER, GROOMING AND NAIL CUT");
        
        app5.setRecId(rec5);
        app5.setPerId(pers3);
        app5.setAppoDate(appdate5);
        app5.setAppoCharge(89000);
        app5.setAppoNotes("EMERGENCY FOR KIDNEY INFECTION");
        
        app6.setRecId(rec7);
        app6.setPerId(pers3);
        app6.setAppoDate(appdate6);
        app6.setAppoCharge(60000);
        app6.setAppoNotes("APPOINTMENT SUCCESFULL XXXXXXXXXXX");
        
        app7.setRecId(rec5);
        app7.setPerId(pers3);
        app7.setAppoDate(appdate7);
        app7.setAppoCharge(60000);
        app7.setAppoNotes("APPOINTMENT SUCCESFULL XXXXXXXXXXX");
        
        app8.setRecId(rec3);
        app8.setPerId(pers2);
        app8.setAppoDate(appdate8);
        app8.setAppoCharge(15000);
        app8.setAppoNotes("APPOINTMENT SUCCESFULL XXXXXXXXXXX");
        
        app9.setRecId(rec3);
        app9.setPerId(pers2);
        app9.setAppoDate(appdate9);
        app9.setAppoCharge(28000);
        app9.setAppoNotes("APPOINTMENT SUCCESFULL XXXXXXXXXXX");
        
        app10.setRecId(rec5);
        app10.setPerId(pers3);
        app10.setAppoDate(appdate10);
        app10.setAppoCharge(145000);
        app10.setAppoNotes("APPOINTMENT SUCCESFULL XXXXXXXXXXX");
        
        appCtrl.create(app1);
        appCtrl.create(app2);
        appCtrl.create(app3);
        appCtrl.create(app4);
        appCtrl.create(app5);
        appCtrl.create(app6);
        appCtrl.create(app7);
        appCtrl.create(app8);
        appCtrl.create(app9);
        appCtrl.create(app10);
    }
    
    public void loadVaccinesInDB(){
        
        Record rec1 = new Record(Long.valueOf(1));
        Record rec2 = new Record(Long.valueOf(2));
        Record rec3 = new Record(Long.valueOf(3));
        Record rec4 = new Record(Long.valueOf(4));
        Record rec5 = new Record(Long.valueOf(5));
        Record rec6 = new Record(Long.valueOf(6));
        Record rec7 = new Record(Long.valueOf(7));
        
        Vacine vac1 = new Vacine();
        Vacine vac2 = new Vacine();
        Vacine vac3 = new Vacine();
        Vacine vac4 = new Vacine();
        Vacine vac5 = new Vacine();
        Vacine vac6 = new Vacine();
        Vacine vac7 = new Vacine();
        Vacine vac8 = new Vacine();
        Vacine vac9 = new Vacine();
        Vacine vac10 = new Vacine();
        Vacine vac11 = new Vacine();
        Vacine vac12 = new Vacine();
        Vacine vac13 = new Vacine();
        Vacine vac14 = new Vacine();
        
        EntityManagerFactory emFactory = Persistence.createEntityManagerFactory("HPVAS_HPU");
        EntityManager em = emFactory.createEntityManager();

        VacineJpaController vacCtrl = new VacineJpaController(emFactory);
        
        vac1.setRecId(rec1);
        vac1.setVacName("canine_rabies");
        float v1dosage = 500;
        vac1.setVacDosage(v1dosage);
        
        vac2.setRecId(rec1);
        vac2.setVacName("canine_hepatitis");
        float v2dosage = 250;
        vac2.setVacDosage(v2dosage);
        
        vac3.setRecId(rec1);
        vac3.setVacName("canine_parvovirus");
        float v3dosage = 120;
        vac3.setVacDosage(v3dosage);
        
        vac4.setRecId(rec2);
        vac4.setVacName("canine_rabies");
        float v4dosage = 300;
        vac4.setVacDosage(v4dosage);
        
        vac5.setRecId(rec2);
        vac5.setVacName("canine_parvovirus");
        float v5dosage = 130;
        vac5.setVacDosage(v5dosage);
        
        vac6.setRecId(rec3);
        vac6.setVacName("canine_rabies");
        float v6dosage = 185;
        vac6.setVacDosage(v6dosage);
        
        
        vac7.setRecId(rec4);
        vac7.setVacName("feline_rabies");
        float v7dosage = 137;
        vac7.setVacDosage(v7dosage);
        
        vac8.setRecId(rec4);
        vac8.setVacName("feline_rinotracheitis");
        float v8dosage = 145;
        vac8.setVacDosage(v8dosage);
        
        
        vac9.setRecId(rec5);
        vac9.setVacName("canine_rabies");
        float v9dosage = 175;
        vac9.setVacDosage(v9dosage);
        
        
        vac10.setRecId(rec5);
        vac10.setVacName("canine_parvovirus");
        float v10dosage = 138;
        vac10.setVacDosage(v10dosage);
        
        vac11.setRecId(rec6);
        vac11.setVacName("canine_hepatitis");
        float v11dosage = 123;
        vac11.setVacDosage(v11dosage);
        
        
        vac12.setRecId(rec7);
        vac12.setVacName("feline-chlamydophila");
        float v12dosage = 250;
        vac12.setVacDosage(v12dosage);
        
        vac13.setRecId(rec7);
        vac13.setVacName("feline-rabies");
        float v13dosage = 123;
        vac13.setVacDosage(v13dosage);
        
        vac14.setRecId(rec7);
        vac14.setVacName("feline-FIV");
        float v14dosage = 230;
        vac14.setVacDosage(v14dosage);
        
        
        
        
        
        vacCtrl.create(vac1);
        vacCtrl.create(vac2);
        vacCtrl.create(vac3);
        vacCtrl.create(vac4);
        vacCtrl.create(vac5);
        vacCtrl.create(vac6);
        vacCtrl.create(vac7);
        vacCtrl.create(vac8);
        vacCtrl.create(vac9);
        vacCtrl.create(vac10);
        vacCtrl.create(vac11);
        vacCtrl.create(vac12);
        vacCtrl.create(vac13);
        vacCtrl.create(vac14);
    
    }
}
